#ifndef GX_DRAWING_2D_H
#define GX_DRAWING_2D_H

#include "Basic/GxLibBasic.h"

namespace GxWinGUI
{
	namespace Drawing
	{
		using namespace GxLibBasic;

		class WinDC : public Object
		{
		protected:
			HDC handle;
		public:
			HDC GetHandle();
		};

		class BitmapDC : public WinDC
		{
		public:
			BitmapDC();
			~BitmapDC();
		};

		class Bitmap : public Object
		{
		private:
			int width;
			int height;
			HBITMAP handle;
			void SetBitmap(HBITMAP bitHandle, Byte * scanLine);
			void CreateDIB(int w, int h);
		public:
			bool AlphaChannel();
			Bitmap(int w, int h);
			Bitmap(const String & fileName);
			Bitmap(int resourceName, HMODULE module = 0);
			~Bitmap();
		public:
			Byte ** ScanLine;
			BitmapDC Canvas;
			int GetWidth();
			int GetHeight();
			void Save(String & fileName);
		};
	};
}

#endif